package com.hoyue.service;

import com.hoyue.bean.BackPicture;
import com.hoyue.dao.BackPicDao;
import com.hoyue.dao.impl.BackPicDaoImpl;

import java.sql.SQLException;
import java.util.List;

/**
 * @author Hoyue_network1
 * @version 1.0
 * Creat by 2018/8/22 23:47
 */
public class BackPicService {

	BackPicDao backPicDao = new BackPicDaoImpl();

	public List<BackPicture> getBackPicture() {
		try {
			return backPicDao.getBackPicture();
		} catch (SQLException e) {
			e.printStackTrace();
		}
		return null;
	}

	public void updatePicture(BackPicture backPicture) {
		try {
			backPicDao.updatePicture(backPicture);
		} catch (SQLException e) {
			e.printStackTrace();
		}
	}

	public String getAddressById(int id) {
		try {
			return backPicDao.getAddressById(id);
		} catch (SQLException e) {
			e.printStackTrace();
		}
		return null;
	}

}
